package org.example.leetCode;

/**
 * @author Administrator
 */
public class IsPowerOfTwo {
    public boolean isPowerOfTwo(int n) {
        int i = 2;
        while (i < n) {
            if (i == n) {
                return true;
            }
            i = i >> 1;
        }
        return false;
    }
}
